package edu.scau.misp.backend_module.service.impl;

import edu.scau.misp.backend_module.domain.Order;
import edu.scau.misp.backend_module.mapper.OrderMapper;
import edu.scau.misp.backend_module.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl  implements OrderService {

    @Autowired
    OrderMapper orderMapper;
    @Override
    public Order getOrderById(Long orderId) {
        return orderMapper.getOrderById(orderId);
    }

    @Override
    public List<Order> listAllOrder() {
        return orderMapper.listAllOrder();
    }

    @Override
    public List<Order> selectOrderList(Order order) {
        return null;
    }

    @Override
    public int insertOrder(Order order) {
        return orderMapper.insertOrder(order);
    }

    @Override
    public int updateOrder(Order order) {
        return orderMapper.updateOrder(order);
    }

    @Override
    public int updateOrderByPay(Order order) {
        return orderMapper.updateOrderByPay(order);
    }

    @Override
    public int deleteOrderById(Long orderId) {
        return orderMapper.deleteOrderById(orderId);
    }

    @Override
    public Long getId() {
        return orderMapper.getId();
    }

}
